
public class Threadd {


    public static void main(String[] args) {
        
        // Thread t = new Thread(()->{
        //     System.out.println("start Threading ok..");
        // });
        // t.start(); // start the Threading

    System.out.print("===================Thread.seelp() ==================");

        Thread t = new Thread(){
            public void run(){
                System.out.println("thread run - 1");

                try {
                    Thread.sleep(10); // ms
                } catch (InterruptedException e) {}
                System.out.println("thread end.");
            }
        };
        t.start();
        try {
             Thread.sleep(20);  // ms
        } catch (InterruptedException e) {}
        System.out.println("main end...");


        System.out.println("=================== t.join wait t thread end ==================");

        Thread nt = new Thread(()->{
            System.out.println("thread running.");
        });

        System.out.println("main start.");
        nt.start();
        // try{
        //     nt.join();
        // }catch(InterruptedException e){}
        System.out.println("main end.");


        System.out.println("=================== testing.. ==================");

        Thread ttt = new Thread(()->{
            for(int i= 0;i<=10;i++){
                System.out.println(i);
                try {
                    Thread.sleep(1200);  // ms
               } catch (InterruptedException e) {}
            }
        });
        ttt.start();
   

    }
}